package com.gg.fmallspringboot.config;
/* stohox
2021/6/20 20:58 */
import org.springframework.context.annotation.Configuration;

import java.io.FileWriter;
import java.io.IOException;

/* *
 *类名：AlipayConfig
 *功能：基础配置类
 *详细：设置帐户有关信息及返回路径
 *修改日期：2017-04-05
 *说明：
 *以下代码只是为了方便商户测试而提供的样例代码，商户可以根据自己网站的需要，按照技术文档编写,并非一定要使用该代码。
 *该代码仅供学习和研究支付宝接口使用，只是提供一个参考。
 */
public class AlipayConfig {

//↓↓↓↓↓↓↓↓↓↓请在这里配置您的基本信息↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

    // 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
    public static String app_id = "2021000117674730";

    // 商户私钥，您的PKCS8格式RSA2私钥
    public static String merchant_private_key = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCCrYvcIAZwhNQgkNTefWFHhQW6FQEm+vcwdNUt0G2M+9Ea6lG0q4Rqy9rLXBj/R2pw0qiCpQcIhZKXruCKn7soyTIkgp0CJFexh3mP1s6ePiBzuSCaVqkI7eQpq8I2kPxujPtPnJalOemMDDVarCjgt/V2Cp+Popix/aWhuX5iUIobF9lmplC9QXmDULcXw+HbeQ5z0hrnXFOO7TtOvTWyasYdvFJsbtMkcw85V3AIzGQcqLERnif9cK1R/AXRfSa43YTWJcBHPRLnrHKbAYDuEDoS0fMEDfsUTATMCA2U048Ih2zRiYl8iLnwyYGlGL2znYA+rK/95GwnhhLhEHfpAgMBAAECggEAX1Iya/5cVCVACwU6kZTJqf7JX6REs+dq+kiu2/1me+mP7V8w/GYEcFaFIcPrZAL3DJdNXgb862VrugNRPS0ou6aPUfyIhPB3m0LkFF0vWFSfHWrT8mD2alIFFbR5NY5q5EUoaDkj1iA5UPPy01Ize0AU5+b13zNOyL7p299P5mwoiQRH46oKz2d9uYfa0JyQeOUBtA5YFlwxwr5OYOM+PaR2JmRFdAJ3GkWnMZY31E8ASACE7T1nzXDsSWc/UZULshGuqZBgTDS7j1uAbWZRGxbXz+roTa0OuzavzIzFyr4Jib2WE07RhPY3oLGFau8tNvProazM8edR64WmHosyNQKBgQC4dTnf/iLJu+LWF4iUzPx05T3WKGQ/ep01GGlnZZ1K+ipCsVFRN4vdaV/x12ZdIO8SDcUUM7jzBBOYZ/nTTjP3U9xdAOFweBmSCeumTO3MelJpXG092fuBi7HTEAR0roRps1GEgNzkcW5wU/m0yuZ0TwKtwu23FYbUAQy5OM1pEwKBgQC1XIT5IqxPJj5CxFSV2jfnSSGBxX+EdxB2TuMOgUaFYXKXBMB+gkCAgQFhr3nO9oA62WSRq6sOSM1tdBC0q07P1RcAHPHKY6wwGwwQou4B+b37WHozqhrkCL3zO+KY7dQgkshgIAYjzgo+83eK2pFvYvtA5ZIoWDoEHXVXV8SWkwKBgE3PtbBVxlsPVSs3FjifGEg/hAxZUaCtmq+RMrWZWfcM/NLRdhoqsmeeUgj08ouKnw8gm+hfwT9SkumRwwNuU+GbkLPy8Sa+oxrF8JBgl1fQqf8kLDkRQVVuln8QnLCUBeuI53Rb39LGPu5Hnmizxu99fQXL2veGry+zmahw28XdAoGAfNP1YlUPLFsyN1pSreHI4JRhT6TUJCSfXA7oES/BjkSITpGivHCCXPBuNwJEYMMhd1/x7KGv1uEdI9zjMrdGQ55zekxxz8/S0DmNkFXUY9+1d65qTe0jHRk3RJdPW9s2SkU9TYw9LZ+/RZzmBthxia0jKoPYmZRAOlzcSwXJ9akCgYEAgtwJ1M8gCSPtInxahhAcaHRdbCgf0qGEjlUoui7nmkwkJHv88okuQT6BdxjvX6xU+oX2Sa9QCK4q1Azxc8XYFebLU+APcyFwGBygLwfj495EQLbza77TVrQKPSYgfR9TIbwe/CtP5TySAw5nM1qjvD6fPt0M18DCJXkfVm4aBkE=";

    // 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
    public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgBALUDAw8GcFi+kN35JJSOYbC7au1x4uOdxCdBm9y9TeoJ7XMXKpMqKOFRDIdpuOvvg4G/8lSHqPijcN6aAvqC/Zfjo28wm4sN7X40RpBtkcKpVDmPCpjk9rpIO/i/nZFQ823RW9jOIBKn2+2jsvpJwxa3uFEBcsupkXmP0tOBKEwHHfk9jgiZ+8Ajw7wF9VTriUSQabyamm+V75MfZkvGgu+sagm4eGRFVR4cJ7vfa2dd7MOY09qOP8FlJiP0mq4DojF2Qgp8VWyBULZnL5jbiIkbZayqOloDd+YsoliPOsX7XX/CGSPUz1HxIzZQnlodQG3bkCQPxeK8EZ3w3ewQIDAQAB";

    // 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String notify_url = "http://stohox.free.idcfengye.com/pay/aliapy_notify";

    // 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String return_url = "http://stohox.free.idcfengye.com";

    // 签名方式
    public static String sign_type = "RSA2";

    // 字符编码格式
    public static String charset = "utf-8";

    // 支付宝网关
    public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";

    //支付宝网关
    //public static String log_path = "C:\\";

    //返回文件格式
    public static String format = "json";


//↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

    /**
     * 写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
     * @param sWord 要写入日志里的文本内容
     */
//    public static void logResult(String sWord) {
//        FileWriter writer = null;
//        try {
//            writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
//            writer.write(sWord);
//        } catch (Exception e) {
//            e.printStackTrace();
//        } finally {
//            if (writer != null) {
//                try {
//                    writer.close();
//                } catch (IOException e) {
//                    e.printStackTrace();
//                }
//            }
//        }
//    }
}

